// https://github.com/shirriff/Arduino-IRremote
//===============================================
#include <SoftwareSerial.h>
#include <IRremote.h>

int RECV_PIN = 11;
int bluetoothTx = 7; //Bluetooth tx pin on arduino
int bluetoothRx = 8; //Bluetooth rx pin on arduino
int pinLED = 10;
int delayLED = 1000;

IRrecv irrecv(RECV_PIN);

decode_results results;
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  bluetooth.begin(9600);
  //LED setup
  pinMode(pinLED,HIGH);
  digitalWrite(pinLED,LOW);
}


void loop()
{
  
    if (irrecv.decode(&results)) {
    //digitalWrite(10,HIGH);
    //Serial.println(results.value, HEX);
    if(results.value == 0xffda25)
    {
      Serial.println("one"); 
      bluetooth.print('1');   
    }
    if(results.value == 0xfff20d)
    {
      Serial.println("two"); 
      bluetooth.print('2');
    }
    irrecv.resume(); // Receive the next value
   }
  //delay(100);
  
}